import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        double kg = in.nextDouble();
        String str = in.next();
        char ch = str.charAt(0);
        int sum = 0;
        sum += 20;
        double val = kg - 1;
        while (val > 0) {
            sum += 1;
            val -= 1;
        }
        if (ch == 'y') sum += 5;
        System.out.println(sum);
    }
}


// 注意类名必须为 Main, 不要有任何 package xxx 信息
class Main1 {
    static int ret = Integer.MAX_VALUE;
    static int path;
    static int[] memo;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] cost = new int[n];
        for(int i = 0; i < n; i++) cost[i] = in.nextInt();
        if(n == 1) {
            System.out.println(cost[0]);
            return;
        }
        memo = new int[n];
        int ret = Integer.MAX_VALUE;
        for(int i = 0; i <= 1; i++) {
            ret = Math.min(ret, dfs(cost, i));
        }
        System.out.println(ret);
    }
    public static int dfs(int[] cost, int pos) {
        if(pos >= cost.length) {
            return 0;
        }
        if(memo[pos] != 0) return memo[pos];
        int ret = Integer.MAX_VALUE;
        for(int i = pos + 1; i <= pos + 2; i++) {
            ret = Math.min(ret, dfs(cost, i));
        }
        memo[pos] = ret + cost[pos];
        return memo[pos];
    }
}

// 注意类名必须为 Main, 不要有任何 package xxx 信息
class Main2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String s1 = in.next();
        String s2 = in.next();
        int tmp = n;
        int dis = Integer.MAX_VALUE;
        int index1 = -1;
        int index2 = -1;
        while(tmp != 0) {
            String str = in.next();
            if(str.equals(s1)) {
                index1 = tmp;
            }
            if(str.equals(s2)) {
                index2 = tmp;
            }
            if(index1 != -1 && index2 != -1) dis = Math.min(dis, Math.abs(index1 - index2));
            tmp--;
        }
        if(dis == Integer.MAX_VALUE) {
            System.out.println(-1);
            return;
        }
        System.out.println(dis);
    }
}


